//
//  MyScrollView.m
//  exercise_滚动视图
//
//  Created by dllo on 15/5/18.
//  Copyright (c) 2015年 lanou3g.com 蓝鸥科技. All rights reserved.
//

#import "MyScrollView.h"

@implementation MyScrollView

- (void)dealloc
{
    [super dealloc];
}


- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        // 初始化界面
        self.scroll = [[UIScrollView alloc]initWithFrame:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height)];
        _scroll.delegate = self;
        _scroll.pagingEnabled = YES;
        [self addSubview:_scroll];
        [self.scroll release];
        
    }
    return self;
}

- (void)setScrollImage:(NSArray *)array
{
    NSMutableArray *myArray = [NSMutableArray arrayWithArray:array];
    id first = [myArray firstObject];
    id last = [myArray lastObject];
    [myArray addObject:first];
    [myArray insertObject:last atIndex:0];
    
    for (int i = 0; i < [myArray count]; i++) {
        NSDictionary *dic = [myArray objectAtIndex:i];
        NSString *name = [dic objectForKey:@"image"];
        
        UIImageView *imageView = [UIImageView alloc]initWithFrame:CGRectMake(self.frame.size.width, <#CGFloat y#>, <#CGFloat width#>, <#CGFloat height#>)
        
        
    }
    
    
    
    
}













/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
